home *** CD-ROM | disk | FTP | other *** search
- Path: web.cae.ca!usenet
- From: Salim Mansouri <salim>
- Newsgroups: comp.lang.c++
- Subject: Problem with the ifstream class !!!
- Date: 8 Apr 1996 22:10:26 GMT
- Organization: CAE - Visual Department
- Message-ID: <4kc2si$8pp@web.cae.ca>
- NNTP-Posting-Host: blackhole.cae.ca
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; IRIX 5.3 IP22)
- X-URL: news:comp.lang.c++
-
- Hi,
- I am using the ifstream class for reading an ASCII file.
-
- ex: char szTmp[255] = "";
- ifstream fin("file.txt");
-
- while (fin)
- {
- fin.getline(szTmp, 250);
- cout<<"The line is : "<<szTmp<<endl;
- }
-
- The problem is that it reads twice the last line ????
- Am i missing something.
- N.B: I am compiling on SGI IRIX 5.3 .
-
- Any help will be appreciate. Mail me.
- Thank you
- --
- Salim MANSOURI
-
-